package com.icoolkj.mall.user.config.demo.feign;

import com.icoolkj.mall.common.Result;
import com.icoolkj.mall.user.config.demo.feign.dto.OrderRequest;
import com.icoolkj.mall.user.config.demo.feign.dto.OrderResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "icoolkj-mall-order01-config-demo", path = "/api/order")
public interface OrderFeignService {

    @GetMapping("/getOrderByUserId")
    Result<List<OrderResponse>> getOrderByUserId(@RequestParam("userId") Long userId);

    @PostMapping("/post1")
    Result<OrderResponse> post1(@RequestBody OrderRequest orderRequest);


}
